<template>
  <div>
     
          <h6>父组件</h6>
          <div>父组件值:{{msg}}</div>
          <button @click="changA">点击改变子组件值</button>
          <h6>子组件</h6>
          <child3></child3>

  </div>

</template>

<script>

    import child3 from './components/son3';



    export default {

        name: 'demoTwenty7',
        components: {
            child3,
            
        },
          data() {
            return {
               msg: 'hello world'
            }

          },

        methods: {
           changA() {
             console.log('父组件 、、、、、')
             console.log(this.$children[0])
               console.log(this.$children[0].message)
             this.$children[0].message = '父组件改变了子组件的值'
           }

        }

    }

</script>
